/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.utn.tpsimulacion02.UI;

/**
 *
 * @author aaltamir
 */
public class VentanaPrincipal extends javax.swing.JFrame {

    /**
     * Creates new form VentanaPrincipal
     */
    public VentanaPrincipal() {
        initComponents();
        this.setTitle("Trabajo Practico 3- Simulacion");
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuBar1 = new javax.swing.JMenuBar();
        jmOpciones = new javax.swing.JMenu();
        jmiExponencial = new javax.swing.JMenuItem();
        jmiPoisson = new javax.swing.JMenuItem();
        jmiNormal = new javax.swing.JMenuItem();
        jmiSalir = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jmOpciones.setText("Opciones");

        jmiExponencial.setText("Exponencial");
        jmiExponencial.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmiExponencialActionPerformed(evt);
            }
        });
        jmOpciones.add(jmiExponencial);

        jmiPoisson.setText("Poisson");
        jmiPoisson.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmiPoissonActionPerformed(evt);
            }
        });
        jmOpciones.add(jmiPoisson);

        jmiNormal.setText("Normal");
        jmiNormal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmiNormalActionPerformed(evt);
            }
        });
        jmOpciones.add(jmiNormal);

        jmiSalir.setText("Salir");
        jmiSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmiSalirActionPerformed(evt);
            }
        });
        jmOpciones.add(jmiSalir);

        jMenuBar1.add(jmOpciones);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 279, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jmiNormalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmiNormalActionPerformed
        VentanaNormal vp = new VentanaNormal();
        vp.setVisible(true);
        
    }//GEN-LAST:event_jmiNormalActionPerformed

    private void jmiExponencialActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmiExponencialActionPerformed
        VentanaExponencial ve = new VentanaExponencial();
        ve.setVisible(true);
    }//GEN-LAST:event_jmiExponencialActionPerformed

    private void jmiPoissonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmiPoissonActionPerformed
        VentanaPoisson vp = new VentanaPoisson();
        vp.setVisible(true);
    }//GEN-LAST:event_jmiPoissonActionPerformed

    private void jmiSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmiSalirActionPerformed
        System.exit(0);
        this.dispose();
    }//GEN-LAST:event_jmiSalirActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VentanaPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VentanaPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VentanaPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VentanaPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new VentanaPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu jmOpciones;
    private javax.swing.JMenuItem jmiExponencial;
    private javax.swing.JMenuItem jmiNormal;
    private javax.swing.JMenuItem jmiPoisson;
    private javax.swing.JMenuItem jmiSalir;
    // End of variables declaration//GEN-END:variables
}
